package com.huawei.petapp2.provider;

import com.chad.library.adapter.base.BaseViewHolder;
import com.chad.library.adapter.base.provider.BaseItemProvider;
import com.huawei.petapp2.R;
import com.huawei.petapp2.adapter.TestHomeAdapter;
import com.huawei.petapp2.entity.Recomment;

/**
 * Created by 吕氏春秋i 2020/4/30
 * Describe:
 */

public class TextItemProvider extends BaseItemProvider<Recomment, BaseViewHolder> {
    @Override
    public int viewType() {
        return TestHomeAdapter.TYPE_TEXT;
    }

    @Override
    public int layout() {
        return R.layout.app_item_home_text;
    }

    @Override
    public void convert(BaseViewHolder helper, Recomment data, int position) {
            helper.setText(R.id.item_tv_main_title,  data.getProductName()+"")
                    .setText(R.id.item_tv_subtitle, data.getContent()+"");
    }

}
